package com.kaifamiao.wrapper;

/**
 * 1、理解包装类的不可变性
 *      八种基本数据类型对应包装类都是不变类(或称作不可变类)
 *      八种基本数据类型对应包装类的实例都是不变对象(或称作不可变对象)
 * 2、认识包装类:
 *    byte  --->  Byte
 *    short --->  Short
 *    int   --->  Integer
 *    long  --->  Long
 *    float --->  Float
 *    double -->  Double
 *    boolean ->  Boolean
 *    char  --->  Character
 */
public class UnderstandImmutable {

    public static void main(String[] args) {

        Byte first = new Byte( (byte)100 );
        System.out.println( first );

        Short second = new Short( (short)9527 );
        System.out.println( second );

        Integer third = new Integer( 123456789 );
        System.out.println( third );

        Long fourth = new Long( 1234567890123456789L );
        System.out.println( fourth );

        Float fifth = new Float( 3.14F );
        System.out.println( fifth );

        Double sixth = new Double( 3.14 );
        System.out.println( sixth );

        Boolean seventh = new Boolean( true );
        System.out.println( seventh );

        Character eighth = new Character( '喵' );
        System.out.println( eighth );

    }

}
